<?php

/**
 * Message translations for \mdmsoft\yii2-admin.
 *
 * It contains the localizable messages extracted from source code.
 * You may modify this file by translating the extracted messages.
 *
 * Each array element represents the translation (value) of a message (key).
 * If the value is empty, the message is considered as not translated.
 * Messages that no longer need translation will have their translations
 * enclosed between a pair of '@@' marks.
 *
 * Message string can be used with plural forms format. Check i18n section
 * of the guide for details.
 *
 * NOTE: this file must be saved in UTF-8 encoding.
 */
return [
    'CALC_GOODS_CASH_TAX' => 'SUM((({price} * {number} - {discount}) * {unit} - {credit}) * {rate} / {base})',
    'CALC_GOODS_CREDIT_TAX' => 'SUM({credit} * {rate} / {base})',
    //商品小计金额：单价*数量-折扣
    //退款商品小计金额：（单价*数量-折扣）/数量 * 退款商品数量
    //商品现金支付金额：商品小计金额-商品积分支付金额
    //退款商品现金支付金额：（单价*数量-折扣-商品积分支付金额）/数量 * 退款商品数量
    //退款商品现金比例提点：（订单商品单价*订单商品数量-订单商品折扣-订单商品支付积分/10）/订单商品数量 * 退款商品数量*订单商品现金比例
    //现金提点：
    //SUM(订单商品单价*订单商品数量-订单商品折扣-订单商品支付积分/10)/订单商品数量 * 退款商品数量*订单商品现金比例
    //(({price} * {number} - {discount}) * {unit} - {credit}) / {number} * {refundNum} * {rate} / {base}
    'CALC_SUB_REFUND_GOODS_CASH_TAX' => 'SUM((({price} * {number} - {discount}) * {unit} - {credit}) / {number} * {refundNum} * {rate} / {base})',
    'CALC_SUB_REFUND_GOODS_CREDIT_TAX' => 'SUM({credit} / {number} * {refundNum} * {rate} / {base})',
    //ROUND
    'ROUND_CALC_GOODS_CASH_TAX' => 'SUM(ROUND((({price} * {number} - {discount}) * {unit} - {credit}) * {rate} / {base},2))',
    'ROUND_CALC_OFFSET_GOODS_CASH_TAX' => 'SUM(ROUND(({amount} * {unit} - {credit}) * {rate} / {base},2))',
    'ROUND_CALC_GOODS_CREDIT_TAX' => 'SUM(ROUND({credit} * {rate} / {base},2))',
    //商品小计金额：单价*数量-折扣
    //退款商品小计金额：（单价*数量-折扣）/数量 * 退款商品数量
    //商品现金支付金额：商品小计金额-商品积分支付金额
    //退款商品现金支付金额：（单价*数量-折扣-商品积分支付金额）/数量 * 退款商品数量
    //退款商品现金比例提点：（订单商品单价*订单商品数量-订单商品折扣-订单商品支付积分/10）/订单商品数量 * 退款商品数量*订单商品现金比例
    //现金提点：
    //SUM(订单商品单价*订单商品数量-订单商品折扣-订单商品支付积分/10)/订单商品数量 * 退款商品数量*订单商品现金比例
    //(({price} * {number} - {discount}) * {unit} - {credit}) / {number} * {refundNum} * {rate} / {base}
    'ROUND_CALC_SUB_REFUND_GOODS_CASH_TAX' => 'SUM(ROUND((({price} * {number} - {discount}) * {unit} - {credit}) / {number} * {refundNum} * {rate} / {base},2))',
    'ROUND_CALC_SUB_REFUND_GOODS_CREDIT_TAX' => 'SUM(ROUND({credit} / {number} * {refundNum} * {rate} / {base},2))',
];
